<?php
require_once($application_folder."/controllers/navigator.php");
class Master extends navigator 
{
    function Master () 
    { 
        parent::navigator();
        $this->load->model('translator');  
        $this->load->library('dataload');  
        $this->load->library('assetsload');
        $this->load->helper('language');
        $this->lang->load('adria', $this->lang_ses->getlang());  
    }

    function index($page='home',$sub='') 
    {   
        if(substr($page,0,3)=='lng'){$this->lang_ses->setLang(substr($page,3,2)); redirect(base_url().substr($page,5,strlen($page)).'/'.$sub);}
        $this->data['page'] = $page;
        $this->data['sub'] = $sub;   
        $this->data['lang'] = $this->lang_ses->getlang();        
        if($sub==''){$seo_page = $page; }else {$seo_page = $sub;}
        $this->seo_data($this->translator->seo_data($seo_page));
        $this->dataload->getdata($page, $this);
        $this->assetsload->getassets($page, $this);
        if($sub==''){ $this->navigate('site/'.$page); }else{ $this->navigate('site/'.$page.'/'.$sub); }            
    }
}